using pixolut.BizBlox;

public class LunchOrder : DataObject
{

//START BizBlox Generated Code : Do not remove or alter this comment
//Last Updated : Friday, 6 November 2009 10:41:17 PM
//BizBlox Version : 1.8.4.0
#region "BizBlox Generated Code"

// ##Start CodeSegment
// $Identifier = +Elements
// $DoNotModify = False

    public LunchOrder(){
    }

    public LunchOrder(System.Guid uid) : base(uid){
    }

    public LunchOrder(System.Guid uid, System.Boolean load) : base(uid, load){
    }

    public LunchOrder(ref DOCollection baseCol, int index) : base(ref baseCol, index){
    }

    public LunchOrder(System.Data.DataRow dr, DOSelection[] selections) : base(dr, selections){
    }

    public new enum Columns {
        LunchOrderID,
        StudentID,
        FoodID,
        dt_OrderDate,
        Quantity
    }

    public override string TableName() {
        return "LunchOrder";
    }

    public override System.Enum UidColumn() {
        return Columns.LunchOrderID;
    }


// ##End CodeSegment

// ##Start CodeSegment
// $Identifier = LunchOrderID
// $DoNotModify = False

    private System.Guid m_LunchOrderID;
    [PrimaryKey(), Persist()]
    public System.Guid LunchOrderID{
        get {
            return m_LunchOrderID;
        }
        set {
            this.Touch((int)Columns.LunchOrderID);
            m_LunchOrderID = value;
        }
    }

// ##End CodeSegment

// ##Start CodeSegment
// $Identifier = StudentID
// $DoNotModify = False

    private System.Guid m_StudentID;
    [Persist()]
    public System.Guid StudentID{
        get {
            return m_StudentID;
        }
        set {
            this.Touch((int)Columns.StudentID);
            m_StudentID = value;
        }
    }

// ##End CodeSegment

// ##Start CodeSegment
// $Identifier = StudentID.ForeignReference
// $DoNotModify = False

    public Student GetByStudentID() {
        Student obj = new Student(StudentID);
        obj.Load();
        return obj;
    }

    public Student GetByStudentID(params System.Enum[] columns) {
        Student obj = new Student(StudentID);
        obj.Load(columns);
        return obj;
    }

// ##End CodeSegment

// ##Start CodeSegment
// $Identifier = FoodID
// $DoNotModify = False

    private System.Guid m_FoodID;
    [Persist()]
    public System.Guid FoodID{
        get {
            return m_FoodID;
        }
        set {
            this.Touch((int)Columns.FoodID);
            m_FoodID = value;
        }
    }

// ##End CodeSegment

// ##Start CodeSegment
// $Identifier = FoodID.ForeignReference
// $DoNotModify = False

    public Food GetByFoodID() {
        Food obj = new Food(FoodID);
        obj.Load();
        return obj;
    }

    public Food GetByFoodID(params System.Enum[] columns) {
        Food obj = new Food(FoodID);
        obj.Load(columns);
        return obj;
    }

// ##End CodeSegment

// ##Start CodeSegment
// $Identifier = dt_OrderDate
// $DoNotModify = False

    private System.DateTime m_dt_OrderDate;
    [Persist(), StringValidator(50)]
    public System.DateTime dt_OrderDate{
        get {
            return m_dt_OrderDate;
        }
        set {
            this.Touch((int)Columns.dt_OrderDate);
            m_dt_OrderDate = value;
        }
    }

// ##End CodeSegment

// ##Start CodeSegment
// $Identifier = Quantity
// $DoNotModify = False

    private System.Int32 m_Quantity;
    [Persist()]
    public System.Int32 Quantity{
        get {
            return m_Quantity;
        }
        set {
            this.Touch((int)Columns.Quantity);
            m_Quantity = value;
        }
    }

// ##End CodeSegment

#endregion

//END BizBlox Generated Code : Do not remove or alter this comment

}